<template>
	<view class="add-product">
		<view class="add-product-1">
			<view class="add-image" @click="choseMainImg" v-if="!productInfo.image">
				<view>
					<image src="https://master.shengejiaju.cn/web/static/icons/ico_add_pic02@2x.png"></image>
					<view>添加{{productInfo.type==1?'商品':'套餐'}}主图</view>
				</view>
			</view>
			<view class="show-img" v-else>
				<image :src="productInfo.image" @click="previewImg" mode="aspectFill"></image>
				<view @click="choseMainImg">更换{{productInfo.type==1?'商品':'套餐'}}主图</view>
			</view>
		</view>
		<view class="add-product-2">
			<view class="add-product-2-cell">
				<text class="title">名称</text>
				<input v-model="productInfo.store_goods_name" :placeholder="productInfo.type==1?'请输入商品名称':'请输入套餐名称'"/>
			</view>
			<view class="add-product-2-cell">
				<text class="title">商品编号</text>
				<input v-model="productInfo.store_goods_sn" :placeholder="productInfo.type==1?'请输入商品编号':'请输入套餐编号'"/>
			</view>
			<view class="add-product-2-cell" v-if="showPlus">
				<text class="title">工厂编号</text>
				<input v-model="productInfo.factory_sn" :placeholder="productInfo.type==1?'请输入工厂编号':'请输入套餐工厂编号'"/>
			</view>
			<view class="add-product-2-cell">
				<text class="title">简介</text>
				<textarea auto-height v-model="productInfo.brief" :placeholder="productInfo.type==1?'请输入商品简介':'请输入套餐简介'"/>
			</view>
		</view>
		<view class="add-product-3" v-if="productInfo.type==1">
			<view class="add-product-3-cell">
				<text class="title">分类</text>
				<view class="select" v-if="!category.length">暂无分类</view>
				<picker @change="pickerCategory" :value="selectCurrent" :range="category" range-key="class_name" v-else>
					<view class="select">
						{{placeholder}} <image src="https://master.shengejiaju.cn/web/static/icons/ico_more_goods@2x.png"></image>
					</view>
				</picker>
			</view>
			<view class="add-product-add" @click="addCategory"><image src="https://master.shengejiaju.cn/web/static/icons/ico_add@2x.png"></image>新增{{productInfo.type==1?'商品':'套餐'}}分类</view>
		</view>
		<view class="add-product-4">
			<view class="add-product-4-item" v-for="(data,index) in sku_list" :key="index">
				<view class="add-product-4-cell">
					<text class="title">规格</text>
					<input type="text" v-model="data.color" />
				</view>
				<view class="add-product-4-cell piclist-cell">
					<text class="title">规格图</text>
					<view class="piclist-box">
						<view class="showimg" v-if="data.img">
							<image class="close" src="https://master.shengejiaju.cn/web/static/icons/ico_close@2x_white.png" @click="delSkuPic(index)"></image>
							<image class="pic" :src="data.img" @click="previewSkuImg(index)" mode="aspectFit"></image>
						</view>
						<view @click="addSkuPic(index)" v-else><image src="https://master.shengejiaju.cn/web/static/icons/ico_ad_pic02.png"></image></view>
					</view>
				</view>
				<view class="add-product-4-cell">
					<text class="title">市场价</text>
					<view class="input">
						<input type="text" placeholder="划线价" placeholder-style="color:#FE9B26"  v-model="data.market_price"/>
						<text>元</text>
					</view>
				</view>
				<view class="add-product-4-cell">
					<text class="title">零售价</text>
					<view class="input">
						<input type="text" v-model="data.retail_price"/>
						<text>元</text>
					</view>
				</view>
				<view class="add-product-4-cell">
					<text class="title">成本价</text>
					<view class="input">
						<input type="text" v-model="data.factory_price"/>
						<text>元</text>
					</view>
				</view>
				<view class="add-product-4-cell">
					<text class="title">库存</text>
					<view class="input">
						<input type="text" v-model="data.sku_num"/>
						<text>件</text>
					</view>
				</view>
				<view class="del" @click="delSku(index,data.store_goods_sku_id)" v-if="index>0"><text>—</text></view>
			</view>
			<view class="add-product-add" @click="addSku"><image src="https://master.shengejiaju.cn/web/static/icons/ico_add@2x.png"></image>添加更多{{productInfo.type==1?'商品':'套餐'}}规格</view>
		</view>
		<view class="add-product-4">
			<view class="add-product-4-item" v-for="(data,index) in parameter_list" :key="index">
				<view class="add-product-4-cell">
					<text class="title">参数名</text>
					<input type="text" v-model="data.parameter_key" placeholder="如：货期" placeholder-style="color:#FE9B26"/>
				</view>
				<view class="add-product-4-cell">
					<text class="title">参数值</text>
					<input type="text" v-model="data.parameter_value" placeholder="如：10天" placeholder-style="color:#FE9B26"/>
				</view>
				<view class="del" @click="delParameter(index)" v-if="index>0"><text>—</text></view>
			</view>
			<view class="add-product-add" @click="addParameter"><image src="https://master.shengejiaju.cn/web/static/icons/ico_add@2x.png"></image>添加更多参数</view>
		</view>
		<view class="add-product-5">
			<text class="title">{{productInfo.type==1?'商品':'套餐'}}副图</text>
			<view class="piclist-box">
				<view class="showimg" v-for="(data,index) in viceImages" :key="index" v-if="viceImages.length">
					<image class="close" src="https://master.shengejiaju.cn/web/static/icons/ico_close@2x_white.png" @click="delVice(data.id,index)"></image>
					<image class="pic" :src="data.url" mode="aspectFit" @click="previewViceImg(index)"></image>
				</view>
				<view @click="addVice"><image src="https://master.shengejiaju.cn/web/static/icons/ico_ad_pic02.png"></image></view>
			</view>
		</view>
		<view class="add-product-5">
			<text class="title">{{productInfo.type==1?'商品':'套餐'}}详情图</text>
			<view class="radioChange">
				<radio-group @change="selectImgType">
					<label class="radio">
						<radio value="1" :checked="productInfo.image_type==1?true:false" color="#2073F5"/>长图
					</label>
					<label class="radio">
						<radio value="2" :checked="productInfo.image_type==2?true:false" color="#2073F5"/>多图
					</label>
				</radio-group>
			</view>
			<view class="piclist-box">
				<view class="showimg" v-for="(data,index) in infoImages" :key="index" v-if="infoImages.length">
					<image class="close" src="https://master.shengejiaju.cn/web/static/icons/ico_close@2x_white.png" @click="delInfo(data.id,index)"></image>
					<image class="pic" :src="data.url" mode="aspectFit" @click="previewInfoImg(index)"></image>
				</view>
				<view @click="addInfo"><image src="https://master.shengejiaju.cn/web/static/icons/ico_ad_pic02.png"></image></view>
			</view>
		</view>
		<view class="add-product-6">
			<text class="title">添加视频</text>
			<view class="video-box">
				<view class="video-show" v-if="productInfo.video">
					<video :src="productInfo.video"></video>
				</view>
				<view class="change-video" v-if="productInfo.video"  @click="addVideo">更换视频</view>
				<view class="video-add" @click="addVideo" v-else>
					<view><image src="https://master.shengejiaju.cn/web/static/icons/ico_ad_vedio@2x.png"></image></view>
					<view>点击添加</view>
				</view>
				<progress :percent="percent" show-info stroke-width="3" v-if="is_uploading" />
			</view>
		</view>
		<view class="add-product-7">
			<view class="add-product-7-cell">
				<text class="title">{{productInfo.type==1?'商品':'套餐'}}排序</text>
				<input type="number" v-model="productInfo.sort" placeholder="数字越大，排序越靠前(默认为0)" placeholder-style="color:#FE9B26"/>
			</view>
			<view class="add-product-7-cell" style="justify-content: space-between;">
				<text class="title" style="width: auto;">是否包邮</text>
				<switch @change="isFreeExpress" :checked="productInfo.free_express==0?false:true" style="transform:scale(0.8)" color="#2073F5"/>
			</view>
			<view class="add-product-7-cell" style="justify-content: space-between;">
				<text class="title" style="width: auto;">设置是否上架</text>
				<switch @change="isUp" :checked="productInfo.is_sale==2?false:true" style="transform:scale(0.8)" color="#2073F5"/>
			</view>
		</view>
		<view class="add-product-submit">
			<button @click="AddGoods">保存</button>
		</view>
		<modal :title="'添加分类'" :placeholderTxt="'请输入分类名称'" @confirm="confirm" @cancel="cancel" v-if="show" :show="show"></modal>
	</view>
</template>

<script>
	const md5 = require('../../static/utils/md5')
	import host from '@/api/config.js'
	export default {
		data() {
			return {
				show: false,
				selectCurrent: 0,
				placeholder: '请选择分类',
				category: [],
				sku_list: [{
					color: '',
					img: '',
					market_price: '',
					retail_price: '',
					factory_price: '',
					sku_num: ''
				}],
				parameter_list: [{
					parameter_key: '',
					parameter_value: ''
				}],
				viceImages: [],
				infoImages: [],
				productInfo: {
					goods_type: 1,
					store_goods_name: '',
					store_goods_sn: '',
					factory_sn: '',
					class_id: '',
					store_id: JSON.parse(uni.getStorageSync('userInfo')).store_id,
					store_name: JSON.parse(uni.getStorageSync('userInfo')).store_name,
					brief: '',
					video: '',
					user_id: JSON.parse(uni.getStorageSync('userInfo')).user_id,
					image: '',
					image_middle: '',
					image_thumb: '',
					sort: '',
					parameter_list: '',
					sku_list: '',
					viceImages: '',
					infoImages: '',
					type: 1,
					is_sale: 1,
					image_type: 1,
					free_express: 0
				},
				uploadParameter: {},
				is_uploading: false,
				percent: '',
				is_package: false,
				showPlus: false
			};
		},
		onShow() {
			// 请求是否有使用限制员工查看品牌
			this.$api.PlugCan({plug_type: 1}).then(res => {
				if(res.datas.status==1){
					this.showPlus = true
				}else{
					this.showPlus = false
				}
			})
			if(this.is_package){
				this.productInfo.type = 2
				uni.setNavigationBarTitle({
					title: "添加套餐"
				})
			}
		},
		onLoad(options) {
			if(options.is_package){
				this.is_package = true
			}
			if(options.id){
				if(options.is_package){
					uni.setNavigationBarTitle({
						title: "编辑套餐"
					})
				}else{
					uni.setNavigationBarTitle({
						title: "编辑商品"
					})
				}
				let data = {
					store_goods_id: options.id,
					paramter: 1
				}
				this.$api.StoreGoodsList(data).then(res => {
					if(res.datas[0].class_name){
						this.placeholder = res.datas[0].class_name
					}
					this.category.forEach((item,index) => {
						if(res.datas[0].class_id == item.class_id){
							this.selectCurrent = index
						}
					})
					this.productInfo = {
						goods_type: 1,
						store_goods_id: res.datas[0].store_goods_id,
						store_goods_name: res.datas[0].store_goods_name,
						store_goods_sn: res.datas[0].store_goods_sn,
						factory_sn: res.datas[0].factory_sn,
						class_id: res.datas[0].class_id,
						store_id: res.datas[0].store_id,
						store_name: res.datas[0].store_name,
						brief:  res.datas[0].brief,
						video:  res.datas[0].video,
						user_id: res.datas[0].user_id,
						image: res.datas[0].image,
						image_middle: res.datas[0].image_middle,
						image_thumb: res.datas[0].image_thumb,
						sort: res.datas[0].sort,
						type: res.datas[0].type,
						is_sale: res.datas[0].is_sale,
						image_type: res.datas[0].image_type
					}
					if(res.datas[0].sku.length){
						this.sku_list = []
						res.datas[0].sku.forEach((item,index) => {
							this.sku_list.push({
								store_goods_sku_id: item.store_goods_sku_id,
								color: item.color,
								img: item.img,
								market_price: item.market_price,
								retail_price: item.retail_price,
								factory_price: item.factory_price,
								sku_num: item.sku_num
							})
						})
					}
					if(res.datas[0].parameter_list){
						this.parameter_list = []
						res.datas[0].parameter_list.forEach((item,index) => {
							this.parameter_list.push({
								parameter_id: item.parameter_id,
								parameter_key: item.parameter_key,
								parameter_value: item.parameter_value
							})
						})
					}
					if(res.datas[0].image_list.length){
						res.datas[0].image_list.forEach((item,index) => {
							if(item.type==4){
								this.viceImages.push({
									id: item.store_goods_image_id,
									url: item.image
								})
							}else{
								this.infoImages.push({
									id: item.store_goods_image_id,
									url: item.image
								})
							}
						})
					}
				})
			}
			this.init()
			if(options.class_id){
				this.productInfo.class_id = options.class_id
			}
		},
		methods: {
			// 参数排序
			objKeySort(obj) {
				var newkey = Object.keys(obj).sort();
				var newObj = {};
				for (var i = 0; i < newkey.length; i++) {
						newObj[newkey[i]] = obj[newkey[i]];
				}
				return newObj;
			},
			init(){
				let data = {}
				// #ifdef H5
				let ua = navigator.userAgent.toLowerCase()
				if (ua.match(/MicroMessenger/i) == "micromessenger") {
					data.port = 'wechat'
				}else{
					data.port = 'h5'
				}
				// #endif
				
				// #ifdef APP-PLUS
				switch(uni.getSystemInfoSync().platform){
					case 'android':
						data.port = 'android'
					  break;
					case 'ios':
						data.port = 'ios'
					  break;
				}
				// #endif
				
				data.key = JSON.parse(uni.getStorageSync('userInfo')).token
				
				data.timestamp = Math.round(new Date() * 1000)
				// 获取签名开始
				let obj = 'jjds2020+'
				let newObj = this.objKeySort(data)
				for (let i in newObj){
					obj += i + '=' + newObj[i] +'&'
				}
				obj = obj.substring(0, obj.length - 1)
				obj += '+jjds2020'
				obj = md5.hexMD5(obj)
				obj = obj.toUpperCase()
				// 获取签名结束
				data.sign = obj
				
				this.uploadParameter = data
				
				let objData = {
					limit: 100,
					page: 0,
					status: 1,
					type: 1,
					store_id: JSON.parse(uni.getStorageSync('userInfo')).store_id
				}
				this.$api.StoreGoodsClassList(objData).then(res => {
					this.category = res.datas
					if(this.productInfo.class_id){
						this.category.forEach((item,index) => {
							if(item.class_id == this.productInfo.class_id){
								this.selectCurrent = index
								this.placeholder = item.class_name
							}
						})
					}
				})
			},
			// 上传商品主图
			choseMainImg(){
				let _this = this
				uni.chooseImage({
					count: 1,
					sourceType: ['album','camera'],
					success(res) {
						let imgs = []
						res.tempFiles.forEach(item => {
							imgs.push({
								uri: item.path
							})
						})
						uni.uploadFile({
							url: `${host}/api/Upimg/UpMajorImg`,
							filePath: imgs[0].uri,
							name: 'file',
							formData: {
								port: _this.uploadParameter.port,
								key: _this.uploadParameter.key,
								timestamp: _this.uploadParameter.timestamp,
								sign: _this.uploadParameter.sign
							},
							success: (uploadFileRes) => {
								_this.productInfo.image = JSON.parse(uploadFileRes.data).datas[0].major_img_big
								_this.productInfo.image_middle = JSON.parse(uploadFileRes.data).datas[0].major_img_middle
								_this.productInfo.image_thumb = JSON.parse(uploadFileRes.data).datas[0].major_img_thumb
							}
						});
					}
				})
			},
			// 主图预览
			previewImg(){
				let arr = []
				arr.push(this.productInfo.image)
				uni.previewImage({
					urls: arr
				})
			},
			// 分类选择
			pickerCategory(e){
				this.selectCurrent = e.detail.value
				this.placeholder = this.category[this.selectCurrent].class_name
				this.productInfo.class_id = this.category[this.selectCurrent].class_id
			},
			// 添加sku
			addSku(){
				this.sku_list.push({
					color: '',
					img: '',
					market_price: '',
					retail_price: '',
					factory_price: '',
					sku_num: ''
				})
			},
			// 移除sku
			delSku(index,id){
				this.sku_list.splice(index,1)
				if(this.productInfo.store_goods_id){
					this.$api.DelSku({store_goods_sku_id: id}).then(res => {
						uni.showToast({
							icon: 'none',
							title: '删除成功',
							duration: 1500
						})
					})
				}
			},
			// 上传sku图片
			addSkuPic(index){
				let _this = this
				uni.chooseImage({
					count: 1,
					sourceType: ['album','camera'],
					success(res) {
						res.tempFilePaths.forEach(item => {
							uni.uploadFile({
								url: `${host}/api/Upimg/UpSkuImg`,
								filePath: item,
								name: 'file',
								formData: {
									port: _this.uploadParameter.port,
									key: _this.uploadParameter.key,
									timestamp: _this.uploadParameter.timestamp,
									sign: _this.uploadParameter.sign
								},
								success: (uploadFileRes) => {
									_this.sku_list[index].img = JSON.parse(uploadFileRes.data).datas[0]
								}
							});
						})
					}
				})
			},
			// 移除sku图
			delSkuPic(index,i){
				this.sku_list[index].img = ''
			},
			// 预览sku图
			previewSkuImg(index){
				let arr = []
				arr.push(this.sku_list[index].img)
				uni.previewImage({
					current: index,
					urls: arr
				})
			},
			// 添加参数
			addParameter(){
				this.parameter_list.push({
					parameter_key: '',
					parameter_value: ''
				})
			},
			// 移除参数
			delParameter(index){
				this.parameter_list.splice(index,1)
			},
			// 上传商品附图
			addVice(){
				let _this = this
				uni.chooseImage({
					count: 9,
					sourceType: ['album','camera'],
					success(res) {
						let url = ''
						let formData = {}
						if(_this.productInfo.store_goods_id){
							url = `${host}/api/Goods/AddGoodsImg`
							formData = {
								type: 4,
								port: _this.uploadParameter.port,
								key: _this.uploadParameter.key,
								timestamp: _this.uploadParameter.timestamp,
								sign: _this.uploadParameter.sign,
								store_goods_id: _this.productInfo.store_goods_id
							}
						}else{
							url = `${host}/api/Upimg/UpViceImg`
							formData = {
								port: _this.uploadParameter.port,
								key: _this.uploadParameter.key,
								timestamp: _this.uploadParameter.timestamp,
								sign: _this.uploadParameter.sign,
							}
						}
						res.tempFilePaths.forEach((item,index) => {
							uni.uploadFile({
								url: url,
								filePath: item,
								name: 'file',
								formData: formData,
								success: (uploadFileRes) => {
									if(_this.productInfo.store_goods_id){
										_this.viceImages.push({
											id: JSON.parse(uploadFileRes.data).datas[0].image_id,
											url: JSON.parse(uploadFileRes.data).datas[0].imgUrl
										})
									}else{
										_this.viceImages.push({
											id: index,
											url: JSON.parse(uploadFileRes.data).datas[0].vice_img_big
										})
									}
								}
							});
						})
					}
				})
			},
			delVice(id,index){
				this.viceImages.splice(index,1)
				if(this.productInfo.store_goods_id){
					this.$api.DelGoodsImg({store_goods_image_id: id}).then(res => {
						uni.showToast({
							icon: 'none',
							title: '删除成功',
							duration: 1500
						})
					})
				}
			},
			// 上传商品详情图
			addInfo(){
				let _this = this
				uni.chooseImage({
					count: 9,
					sourceType: ['album','camera'],
					success(res) {
						let url = ''
						let formData = {}
						if(_this.productInfo.store_goods_id){
							url = `${host}/api/Goods/AddGoodsImg`
							formData = {
								type: 5,
								port: _this.uploadParameter.port,
								key: _this.uploadParameter.key,
								timestamp: _this.uploadParameter.timestamp,
								sign: _this.uploadParameter.sign,
								store_goods_id: _this.productInfo.store_goods_id
							}
						}else{
							url = `${host}/api/Upimg/UpInfoImg`
							formData = {
								port: _this.uploadParameter.port,
								key: _this.uploadParameter.key,
								timestamp: _this.uploadParameter.timestamp,
								sign: _this.uploadParameter.sign,
							}
						}
						res.tempFilePaths.forEach((item,index) => {
							uni.uploadFile({
								url: url,
								filePath: item,
								name: 'file',
								formData: formData,
								success: (uploadFileRes) => {
									if(_this.productInfo.store_goods_id){
										_this.infoImages.push({
											id: JSON.parse(uploadFileRes.data).datas[0].image_id,
											url: JSON.parse(uploadFileRes.data).datas[0].imgUrl
										})
									}else{
										_this.infoImages.push({
											id: index,
											url: JSON.parse(uploadFileRes.data).datas[0]
										})
									}
								}
							});
						})
					}
				})
			},
			// 移除商品详情图
			delInfo(id,index){
				this.infoImages.splice(index,1)
				if(this.productInfo.store_goods_id){
					this.$api.DelGoodsImg({store_goods_image_id: id}).then(res => {
						uni.showToast({
							icon: 'none',
							title: '删除成功',
							duration: 1500
						})
					})
				}
			},
			// 附图预览
			previewViceImg(index){
				let arr = []
				this.viceImages.forEach(item => {
					arr.push(item.url)
				})
				uni.previewImage({
					current: index,
					urls: arr
				})
			},
			// 详情图预览
			previewInfoImg(index){
				let arr = []
				this.infoImages.forEach(item => {
					arr.push(item.url)
				})
				uni.previewImage({
					current: index,
					urls: arr
				})
			},
			// 添加视频
			addVideo(){
				let _this = this
				uni.chooseVideo({
					sourceType: ['camera', 'album'],
					success: function (res) {
						_this.is_uploading = true
						let uploadTask = uni.uploadFile({
							url: `${host}/api/Upimg/UpVideo`,
							filePath: res.tempFilePath,
							name: 'file',
							formData: {
								port: _this.uploadParameter.port,
								key: _this.uploadParameter.key,
								timestamp: _this.uploadParameter.timestamp,
								sign: _this.uploadParameter.sign
							},
							success: (uploadFileRes) => {
								if(uploadFileRes.data){
									_this.is_uploading = false
									_this.productInfo.video = JSON.parse(uploadFileRes.data).datas
								}
							}
						});
						uploadTask.onProgressUpdate((uploadPress) => {
							_this.percent = uploadPress.progress
						})
					}
				});
			},
			isUp(e){
				if(e.detail.value){
					this.productInfo.is_sale = 1
				}else{
					this.productInfo.is_sale = 2
				}
			},
			isFreeExpress(e){
				if(e.detail.value){
					this.productInfo.free_express = 1
				}else{
					this.productInfo.free_express = 0
				}
			},
			addCategory(){
				this.show = true
			},
			cancel(){
				this.show = false
			},
			confirm(e){
				this.show = false
				let data = {
					class_name: JSON.parse(e).text,
					img:  JSON.parse(e).img?JSON.parse(e).img:'',
					store_id: JSON.parse(uni.getStorageSync('userInfo')).store_id,
					status: 1
				}
				this.$api.AddGoodsClass(data).then(res => {
					uni.showToast({
						icon: 'none',
						title: '添加成功',
						duration: 1500
					})
					setTimeout(() => {
						this.init()
					},1500)
				})
			},
			// 添加商品
			AddGoods(){
				if(this.parameter_list.length > 0 && this.parameter_list[0].parameter_key){
					this.productInfo.parameter_list = JSON.stringify(this.parameter_list)
				}
				if(this.sku_list.length > 0 && this.sku_list[0].color){
					this.productInfo.sku_list = JSON.stringify(this.sku_list)
				}
				let viceArr = []
				this.viceImages.forEach(item => {
					viceArr.push(item.url)
				})
				this.productInfo.viceImages = viceArr.join(',')
				let infoArr = []
				this.infoImages.forEach(item => {
					infoArr.push(item.url)
				})
				this.productInfo.infoImages = infoArr.join(',')
				if(this.productInfo.store_goods_id){
					delete this.productInfo.viceImages
					delete this.productInfo.infoImages
					this.$api.UpGoods(this.productInfo).then(res => {
						uni.showToast({
							icon: 'none',
							title: '修改成功',
							duration: 1500
						})
						setTimeout(() => {
							uni.navigateBack()
						},1500)
					})
				}else{
					this.$api.AddGoods(this.productInfo).then(res => {
						uni.showToast({
							icon: 'none',
							title: '添加成功',
							duration: 1500
						})
						setTimeout(() => {
							uni.navigateBack()
						},1500)
					})
				}
			},
			selectImgType(e){
				this.productInfo.image_type = e.detail.value
			}
		}
	}
</script>

<style lang="scss">
	@import  '../../static/scss/add-product.scss';
	.del{
		text-align: center;
		margin-top: 40rpx;
		text{
			display: inline-block;
			border-radius: 50%;
			border: solid 1px red;
			width: 40rpx;
			height: 40rpx;
			line-height: 40rpx;
			color: red;
		}
	}
	.radioChange{
		margin-bottom: 30rpx;
		font-size: 24rpx;
		label{
			margin-right: 20rpx;
		}
	}
</style>